<template>
    <view style="width: 100%; height:500rpx;padding: 0 20rpx;">
        <lechart ref="chart"></lechart>
    </view>
</template>
<script>
const echarts = require('../static/echarts.min.js')
//---or----------------------------------
import lechart from '../uni_modules/lime-echart/components/l-echart/l-echart.vue'
export default {
    components: {
        lechart
    },
    data() {
        return {
            option: {
                legend: {
                    data: ['收入', '支出']
                },
                grid: {
                    containLabel: true
                },
                xAxis: {
                    name: '月份',
                    type: 'category',
                    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
                },
                yAxis: {
                    name: '金额',
                    type: 'value'
                },
                series: [
                    {
                        data: [150, 230, 224, 218, 135, 147, 260],
                        type: 'line'
                    }
                ]
            }
        }
    },
    mounted() {
		console.log('我出发是了');
		console.log('222我出发是了');

        this.$refs.chart.init(echarts, chart => {
		console.log('333',this.option);

			chart.setOption(this.option);
            console.log('chart',chart);
            
		});
		console.log('444');

    }
}
</script>
<style lang="scss" scoped></style>